var constant = require('../common/constant');
loginService.$inject=['$http'];

function loginService($http){
    return {
        login:login
    }

    function login(account,pwd,callback){
        var baseUrl = constant.BaseUrl;
        console.log("account:"+account+",pwd:"+pwd);
        $http.get(baseUrl+'/merchant/'+account+'/'+pwd)
            .then(function successCallback(response) {
            callback(response);
        }, function errorCallback(response) {
            // 请求失败执行代码
            callback(response);
        });
    }


}

module.exports = loginService;